﻿using Rsd.Dudu.Core;
using Rsd.Faith.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rsd.Faith.Fiscal.Core
{
    public interface IBookService:IService
    {
        /// <summary>
        /// 创建小区账户 如果存在 返回已有账户
        /// </summary>
        /// <param name="xiaoQuBianHao"></param>
        /// <param name="xiaoQuMingCheng"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        BookXiaoQuZongZhangModel NewXiaoQuAccount(string xiaoQuBianHao, string xiaoQuMingCheng, DateTime date, bool autoSave = true);
        /// <summary>
        /// 创建分户账户 如果存在 返回已有账户
        /// </summary>
        /// <param name="fangwubianhao"></param>
        /// <param name="xiaoqubianhao"></param>
        /// <returns></returns>
        BookFenHuZhangModel NewFenHuAccount(string fangwubianhao, string xiaoqubianhao, DateTime date, bool autoSave = true);
        /// <summary>
        /// 创建单元账户 如果存在 返回已有账户
        /// </summary>
        /// <param name="date"></param>
        /// <param name="prefix"></param>
        /// <returns></returns>
        BookDanYuanMingXiZhangModel NewDanYuanAccount(string danYuanHao, string louDongHao, string xiaoQuBianHao, DateTime date, bool autoSave = true);
        /// <summary>
        /// 创建楼栋账户 如果存在 返回已有账户
        /// </summary>
        /// <param name="louDongHao"></param>
        /// <param name="xiaoQuBianHao"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        BookLouDongMingXiZhangModel NewLouDongAccount(string louDongHao, string xiaoQuBianHao, DateTime date, bool autoSave = true);

        /// <summary>
        /// 分户账目核算扎帐（缴存、使用、利息收入、记前期余额、更新所属期）
        /// </summary>
        /// <param name="xiaoQuBianHao"></param>
        /// <param name="suoShuQi">更新所属期</param>
        /// <returns></returns>
        int FenHuAccounting(string xiaoQuBianHao, string suoShuQi);
    }
}
